package com.cn.springcloudwechat.mapper.mapper;

import com.cn.springcloudwechat.model.YmUser;
import com.cn.springcloudwechat.model.YmUserChild;
import com.cn.springcloudwechat.model.dto.YmChildDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface YmUserChildMapper {
    int deleteByPrimaryKey(Long childId);

    int insert(YmUserChild record);

    int insertSelective(YmUserChild record);

    /**
     * 根据宝宝id查询宝宝信息
     * @param childId
     * @return
     */
    YmUserChild selectByPrimaryKey(Long childId);

    int updateByPrimaryKeySelective(YmUserChild record);

    int updateByPrimaryKey(YmUserChild record);

    /**
     * 获取用户宝宝列表宝宝
     * @param userId
     * @return
     */
    List<YmUserChild> getUserChild(Long userId);

    /**
     * 获取用户宝宝下拉框
     * @param userId
     * @return
     */
    List<YmChildDto> getChildName(Long userId);

    /**
     * 根据宝宝姓名查询宝宝
     * @param name
     * @return
     */
    YmUserChild getYmUserChildByName(@Param("name") String name,@Param("userId") Long userId);

}